/**
 *
 * @author Gratien
 */
package edu.com.gestionstock.vue;

import java.awt.Color;
import javax.swing.JPanel;
import java.awt.GridLayout;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;

import javax.swing.JButton;
import javax.swing.JFormattedTextField;

public class PanneauAjoutClient extends JPanel
{

    private final static String[] TYPE =
    {
       "", "Mademoiselle", "Madame", "Monsieur"
    };
    private JComboBox jComboCivilite = null;
    private JLabel jLabelCivilite = null;
    private JLabel jLabelNom = null;
    private JLabel jLabelPrenom = null;
    private JLabel jLabelRue = null;
    private JLabel jLabelCodePostal = null;
    private JLabel jLabelCommune = null;
    private JLabel jLabelDateNaissance = null;
    private JLabel jLabelTelephone = null;
    private JTextField jTextFieldNom = null;
    private JTextField jTextFieldPrenom = null;
    private JTextField jTextFieldRue = null;
    private JTextField jTextFieldCodePostal = null;
    private JTextField jTextFieldCommune = null;
    private JTextField jTextFieldDateNaissance = null;
    private JTextField jTextFieldTelephone = null;
    private JButton jButtonAjouter = null;
    private JButton jButtonAnnuler = null;

    public JComboBox getJComboBox_Civilite()
    {
        if ( jComboCivilite == null )
        {
            jComboCivilite = new JComboBox(TYPE);
        }
        return jComboCivilite;
    }

    public JTextField getJTextField_Nom()
    {
        if ( jTextFieldNom == null )
        {
            jTextFieldNom = new JTextField();
        }
        return jTextFieldNom;
    }

    public JTextField getJTextField_Prenom()
    {
        if ( jTextFieldPrenom == null )
        {
            jTextFieldPrenom = new JTextField();
        }
        return jTextFieldPrenom;
    }

    public JTextField getJTextField_Rue()
    {
        if ( jTextFieldRue == null )
        {
            jTextFieldRue = new JTextField();
        }
        return jTextFieldRue;
    }

    public JTextField getJTextField_CodePostal()
    {
        if ( jTextFieldCodePostal == null )
        {
            jTextFieldCodePostal = new JTextField();
        }
        return jTextFieldCodePostal;
    }

    public JTextField getJTextField_Commune()
    {
        if ( jTextFieldCommune == null )
        {
            jTextFieldCommune = new JTextField();
        }
        return jTextFieldCommune;
    }

    public JTextField getJTextField_DateNaissance()
    {
        if ( jTextFieldDateNaissance == null )
        {
            jTextFieldDateNaissance = new JTextField();
        }
        return jTextFieldDateNaissance;
    }

     public JTextField getJTextField_Telephone()
    {
        if ( jTextFieldTelephone == null )
        {
            jTextFieldTelephone = new JTextField();
        }
        return jTextFieldTelephone;
    }
     
    public PanneauAjoutClient()
    {
        super();
        initialize();
    }

    private void initialize()
    {
        jLabelCivilite = new JLabel();
        jLabelCivilite.setText("Civilité");
        jLabelNom = new JLabel();
        jLabelNom.setText("Nom");
        jLabelPrenom = new JLabel();
        jLabelPrenom.setText("Prénom");
        jLabelRue = new JLabel();
        jLabelRue.setText("Rue");
        jLabelCodePostal = new JLabel();
        jLabelCodePostal.setText("Code Postal");
        jLabelCommune = new JLabel();
        jLabelCommune.setText("Commune");
        jLabelDateNaissance = new JLabel();
        jLabelDateNaissance.setText("Date De Naissance");
        jLabelTelephone = new JLabel();
        jLabelTelephone.setText("Téléphone");

        GridLayout gridLayout1 = new GridLayout();
        gridLayout1.setRows(9);
        this.setLayout(gridLayout1);
        this.add(jLabelCivilite, null);
        this.add(getJComboBox_Civilite(), null);
        this.add(jLabelNom, null);
        this.add(getJTextField_Nom(), null);
        this.add(jLabelPrenom, null);
        this.add(getJTextField_Prenom(), null);
        this.add(jLabelRue, null);
        this.add(getJTextField_Rue(), null);
        this.add(jLabelCodePostal, null);
        this.add(getJTextField_CodePostal(), null);
        this.add(jLabelCommune, null);
        this.add(getJTextField_Commune(), null);
        this.add(jLabelDateNaissance, null);
        this.add(getJTextField_DateNaissance(), null);
        this.add(jLabelTelephone, null);
        this.add(getJTextField_Telephone(), null);

        this.add(getJButtonAjouter(), null);
        this.add(getJButtonAnnuler(), null);
    }

    // Initialisation du bouton de recherche 
    public JButton getJButtonAjouter()
    {
        if ( jButtonAjouter == null )
        {
            jButtonAjouter = new JButton();
            jButtonAjouter.setText("Ajouter");
        }
        return jButtonAjouter;
    }

    // Initialisation du bouton Annuler
    public JButton getJButtonAnnuler()
    {
        if ( jButtonAnnuler == null )
        {
            jButtonAnnuler = new JButton();
            jButtonAnnuler.setText("Annuler");
        }
        return jButtonAnnuler;
    }

    public void setjTextFieldNom(String jTextFieldNom)
    {
        this.jTextFieldNom.setText(jTextFieldNom);
    }

    public void setjTextFieldPrenom(String jTextFieldPrenom)
    {
        this.jTextFieldPrenom.setText(jTextFieldPrenom);
    }

    public void setjTextFieldRue(String jTextFieldRue)
    {
        this.jTextFieldRue.setText(jTextFieldRue);
    }

    public void setjTextFieldCodePostal(String jTextFieldCodePostal)
    {
        this.jTextFieldCodePostal.setText(jTextFieldCodePostal);
    }

    public void setjTextFieldCommune(String jTextFieldCommune)
    {
        this.jTextFieldCommune.setText(jTextFieldCommune);
    }

    public void setjTextFieldDateNaissance(String jTextFieldDateNaissance)
    {
        this.jTextFieldDateNaissance.setText(jTextFieldDateNaissance);
    }

    public void setjTextFieldTelephone(String jTextFieldTelephone)
    {
        this.jTextFieldTelephone.setText(jTextFieldTelephone);
    }
}